package fuckjava;

import org.apache.commons.codec.digest.DigestUtils;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

public class ssssss {
	public static void main(String[] args) {
		
		
		String md5Key = DigestUtils.md5Hex("123456").toLowerCase();
		System.out.println(md5Key);
		
		JSONObject ctrl = new JSONObject();
//		ctrl.put("masterSwitch", 1);
//		ctrl.put("xfzy", 0);
//		ctrl.put("snjh", 0);
//		ctrl.put("humidification", 0);
//		ctrl.put("childLock", 0);
//		ctrl.put("autorunGsxf", 1);
//		ctrl.put("school", 1);
//		ctrl.put("powerXf", 1);
//		ctrl.put("disinfection", 1);
		ctrl.put("anion", 1);
		ctrl.put("patternTcl", 0);
		
		JSONObject devdata = new JSONObject();
		devdata.put("temperature", "25");
		devdata.put("humidity", "60");
		devdata.put("particulateMatter", "800");
		devdata.put("carbonDioxide", "520");
		
		
		JSONObject all = new JSONObject();
		all.put("clientType", "app");
		all.put("cateEquipId", "5b86471cf2da468791745d11d0a54b28");
		all.put("equipNum", "cc:50:e3:27:e8:8f");
		all.put("channelMsg","0897ff611065441b9964f9e6aa4704ac");
		all.put("ctrl", ctrl);
		//all.put("devdata", devdata);
		
		System.out.println(all.toString()+"&END");
		
		
		JSONObject jsd = new JSONObject();
		jsd.put("Permission", "Get,Update");
		JSONArray jarr = new JSONArray();
		jarr.add("cam:817294795:1");
		jsd.put("Resource", jarr);
		System.out.println(jsd);
		
	}
}
